import request from "@/utils/request"

export default{
    //分页条件查询文章列表
    getList(query,current=1,size=20){
        return request({
            url:`/article/article/search`,
            method:"post",
            data:{...query,current,size}
        })
    },
    //查询正常状态下的分类
    getById(id){
        return request({
            url:`/article/article/${id}`,
            method:"get"
        })
    },
    //获取所有正常状态下的分类和标签
    getCategoryAndLabel(){
        return request({
            url:`/article/category/label/list`,
            method:'get'
        })
    },
    //文章审核通过
    auditSucess(id){
        return request({
            url:`/article/article/audit/success/${id}`,
            method:"get"
        })
    },
    //审核未通过
    auditFail(id){
        return request({
            url:`/article/article/audit/fail/${id}`,
            method:"get"
        })
    },
    //删除文章
    deleteById(id){
        return request({
            url:`/article/article/${id}`,
            method:"delete"
        })
    }
}